home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / sphere.h < prev    next >
C/C++ Source or Header  |  1993-02-17  |  1KB  |  34 lines

  1. #ifndef SPHERE_H
  2. #define SPHERE_H
  3.  
  4. typedef struct Sphere Sphere;
  5.  
  6. extern GeomClass *SphereClass;
  7.  
  8. void SphereMinMax(Sphere *sphere, HPoint3 *min, HPoint3 *max);
  9. void SphereCenter(Sphere *sphere, HPoint3 *center);
  10. float SphereRadius(Sphere *sphere);
  11. void SphereSwitchSpace(Sphere *sphere, int space);
  12.  
  13. /* Makes sphere encompassing both other spheres - new sphere if dest == NULL,
  14.  * just puts results in dest otherwise */
  15. Sphere *SphereUnion3(Sphere *a, Sphere *b, Sphere *dest);
  16.  
  17. /* points is actually a six-element array containing the points with
  18.  * the minimum and maximum x, y, and z coordinates. */
  19. void SphereEncompassBounds(Sphere *sphere, HPoint3 *points);
  20.  
  21. /* Returns zero if didn't change sphere, non-zero if did */
  22. int SphereAddHPt3(Sphere *sphere, HPoint3 *point, Transform T);
  23. int SphereAddHPt3N(Sphere *sphere, HPoint3 *point, int n, Transform T);
  24.  
  25. /* Modifies sphere to surround all points */
  26. void SphereEncompassHPt3N(Sphere *sphere, HPoint3 *point, int n, Transform T);
  27. /* Finds points with the maximum dimensional span - spanPts is an array
  28.  * of 6 elements (2 points per axis) */
  29. void MaxDimensionalSpan(HPoint3 *spanPts, HPoint3 *point);
  30. void MaxDimensionalSpanN(HPoint3 *spanPts, HPoint3 *points, int n);
  31.  
  32. #endif
  33.  
  34.